package com.lgq.cfw.dao;

import com.lgq.cfw.bean.TableRole;
import com.lgq.cfw.bean.example.TableRoleExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface TableRoleMapper {

    /**
     * 通过id查询角色信息
     * @param userId 用户id
     * @return 角色信息的list
     */
    List<TableRole> getRoleById(Integer userId);

    long countByExample(TableRoleExample example);

    int deleteByExample(TableRoleExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(TableRole record);

    int insertSelective(TableRole record);

    List<TableRole> selectByExample(TableRoleExample example);

    TableRole selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") TableRole record, @Param("example") TableRoleExample example);

    int updateByExample(@Param("record") TableRole record, @Param("example") TableRoleExample example);

    int updateByPrimaryKeySelective(TableRole record);

    int updateByPrimaryKey(TableRole record);
}